From: Andrew Cooper Date: Fri, 31 Oct 2014 10:28:36 +0000 (+0100) Subject: process softirqs while dumping domains X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4119 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=9cf71226edabd8b9bc81a5eb57823dacbe8b4bd8;p=xen.git process softirqs while dumping domains Process softirqs once per domain, and once every 64 vcpus in a guest to avoid being hit by the NMI watchdog. Discovered against a VM which had accidentally been assigned 8192 vcpus. Signed-off-by: Andrew Cooper Reviewed-by: Dario Faggioli --- diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c index 809378c2a5..a91772680e 100644 --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -253,6 +253,9 @@ static void dump_domains(unsigned char key) for_each_domain ( d ) { unsigned int i; + + process_pending_softirqs(); + printk("General information for domain %u:\n", d->domain_id); cpuset_print(tmpstr, sizeof(tmpstr), d->domain_dirty_cpumask); printk(" refcnt=%d dying=%d pause_count=%d\n", @@ -287,6 +290,9 @@ static void dump_domains(unsigned char key) d->domain_id); for_each_vcpu ( d, v ) { + if ( !(v->vcpu_id & 0x3f) ) + process_pending_softirqs(); + printk(" VCPU%d: CPU%d [has=%c] poll=%d " "upcall_pend = %02x, upcall_mask = %02x ", v->vcpu_id, v->processor, @@ -311,6 +317,9 @@ static void dump_domains(unsigned char key) { for_each_vcpu ( d, v ) { + if ( !(v->vcpu_id & 0x3f) ) + process_pending_softirqs(); + printk("Notifying guest %d:%d (virq %d, port %d)\n", d->domain_id, v->vcpu_id, VIRQ_DEBUG, v->virq_to_evtchn[VIRQ_DEBUG]);